package com.codeape.number.entity;

import android.os.Parcel;
import android.os.Parcelable;

public class Result implements Parcelable {

    public String guaName, guaCi, yaoNumber, yaoCi, yaoCiExplain;

    public Result(String guaName, String guaCi, String yaoNumber, String yaoCi, String yaoCiExplain) {
        this.guaName = guaName;
        this.guaCi = guaCi;
        this.yaoNumber = yaoNumber;
        this.yaoCi = yaoCi;
        this.yaoCiExplain = yaoCiExplain;
    }

    /**
     * 自动创建的的构造器，使用反序列化得到的 Parcel 构造对象
     *
     * @param in Parcel
     */
    private Result(Parcel in) {
        guaName = in.readString();
        guaCi = in.readString();
        yaoNumber = in.readString();
        yaoCi = in.readString();
        yaoCiExplain = in.readString();
    }

    /**
     * 反序列化
     */
    public static final Creator<Result> CREATOR = new Creator<Result>() {
        /**
         * 反序列创建对象
         * @param in Parcel
         * @return Result
         */
        @Override
        public Result createFromParcel(Parcel in) {
            return new Result(in);
        }

        /**
         * 反序列创建对象数组
         * @param size int
         * @return Result[]
         */
        @Override
        public Result[] newArray(int size) {
            return new Result[size];
        }
    };


    @Override
    public int describeContents() {
        return 0;
    }

    /**
     * 序列化
     *
     * @param parcel Parcel
     * @param i      0 或者 1
     */
    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(guaName);
        parcel.writeString(guaCi);
        parcel.writeString(yaoNumber);
        parcel.writeString(yaoCi);
        parcel.writeString(yaoCiExplain);
    }

    public String getGuaName() {
        return guaName;
    }

    public void setGuaName(String guaName) {
        this.guaName = guaName;
    }

    public String getGuaCi() {
        return guaCi;
    }

    public void setGuaCi(String guaCi) {
        this.guaCi = guaCi;
    }

    public String getYaoNumber() {
        return yaoNumber;
    }

    public void setYaoNumber(String yaoNumber) {
        this.yaoNumber = yaoNumber;
    }

    public String getYaoCi() {
        return yaoCi;
    }

    public void setYaoCi(String yaoCi) {
        this.yaoCi = yaoCi;
    }

    public String getYaoCiExplain() {
        return yaoCiExplain;
    }

    public void setYaoCiExplain(String yaoCiExplain) {
        this.yaoCiExplain = yaoCiExplain;
    }
}
